package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the KNOWLEDGE_SKILL database table.
 * 
 */
@Entity
@Table(name="KNOWLEDGE_SKILL")
@NamedQuery(name="KnowledgeSkill.findAll", query="SELECT k FROM KnowledgeSkill k")
public class KnowledgeSkill implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="KNOWLEDGE_SKILL_KNOWSKID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="KNOWLEDGE_SKILL_KNOWSKID_GENERATOR")
	@Column(name="KNOWSK_ID")
	private long knowskId;

	private String knowsk;

	@Column(name="KNOWSK_CLOSE")
	private BigDecimal knowskClose;

	@Column(name="KNOWSK_EXPLAIN")
	private String knowskExplain;

	@Column(name="KNOWSK_NAME")
	private String knowskName;

	//bi-directional many-to-one association to KnowledgeLabel
	@OneToMany(mappedBy="knowledgeSkill")
	@JSONField(serialize=false)
	private List<KnowledgeLabel> knowledgeLabels;

	public KnowledgeSkill() {
	}

	public long getKnowskId() {
		return this.knowskId;
	}

	public void setKnowskId(long knowskId) {
		this.knowskId = knowskId;
	}

	public String getKnowsk() {
		return this.knowsk;
	}

	public void setKnowsk(String knowsk) {
		this.knowsk = knowsk;
	}

	public BigDecimal getKnowskClose() {
		return this.knowskClose;
	}

	public void setKnowskClose(BigDecimal knowskClose) {
		this.knowskClose = knowskClose;
	}

	public String getKnowskExplain() {
		return this.knowskExplain;
	}

	public void setKnowskExplain(String knowskExplain) {
		this.knowskExplain = knowskExplain;
	}

	public String getKnowskName() {
		return this.knowskName;
	}

	public void setKnowskName(String knowskName) {
		this.knowskName = knowskName;
	}

	public List<KnowledgeLabel> getKnowledgeLabels() {
		return this.knowledgeLabels;
	}

	public void setKnowledgeLabels(List<KnowledgeLabel> knowledgeLabels) {
		this.knowledgeLabels = knowledgeLabels;
	}

	public KnowledgeLabel addKnowledgeLabel(KnowledgeLabel knowledgeLabel) {
		getKnowledgeLabels().add(knowledgeLabel);
		knowledgeLabel.setKnowledgeSkill(this);

		return knowledgeLabel;
	}

	public KnowledgeLabel removeKnowledgeLabel(KnowledgeLabel knowledgeLabel) {
		getKnowledgeLabels().remove(knowledgeLabel);
		knowledgeLabel.setKnowledgeSkill(null);

		return knowledgeLabel;
	}

}